unit Setup_Unit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TFormSetup = class(TForm)
    GroupBoxFolderReading: TGroupBox;
    quick_loading_checkbox: TCheckBox;
    load_whole_folder_checkbox: TCheckBox;
    GroupBoxPaths: TGroupBox;
    converter_path_edit: TLabeledEdit;
    browse_converter_path_button: TButton;
    templates_path_edit: TLabeledEdit;
    browse_templates_path_button: TButton;
    GroupBoxPublish: TGroupBox;
    quick_publication_checkbox: TCheckBox;
    internet_publication_checkbox: TCheckBox;
    GroupBoxSeparate: TGroupBox;
    move_unsorted_checkbox: TCheckBox;
    ButtonClose: TButton;
    browse_editor_path_btn: TButton;
    editor_path_edit: TLabeledEdit;
    add_params_edit: TLabeledEdit;
    procedure browse_templates_path_buttonClick(Sender: TObject);
    procedure browse_converter_path_buttonClick(Sender: TObject);
    procedure ButtonCloseClick(Sender: TObject);
    procedure browse_editor_path_btnClick(Sender: TObject);
    procedure browse_editor_path_btnKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormSetup: TFormSetup;

implementation

{$R *.dfm}

uses cfunc;

procedure TFormSetup.browse_templates_path_buttonClick(Sender: TObject);
begin
  templates_path_edit.Text := VisualSelectFile(templates_path_edit.Text);
end;

procedure TFormSetup.browse_converter_path_buttonClick(Sender: TObject);
begin
  converter_path_edit.Text := VisualSelectFile(converter_path_edit.Text);
end;

procedure TFormSetup.ButtonCloseClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

procedure TFormSetup.browse_editor_path_btnClick(Sender: TObject);
begin
  editor_path_edit.Text := VisualSelectFile(editor_path_edit.Text);
end;

procedure TFormSetup.browse_editor_path_btnKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  if (Key = 27) then
    ButtonCloseClick(Sender);
end;

end.
